package com.easylinkin.linkappapi.positioning.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * class info :电子围栏
 *
 * @author liuqihang
 * @date 2021/7/27 10:57
 */
@Data
@Accessors(chain = true)
@TableName(value = "sbdw_electronicfence")
public class ElectronicFence {

    @TableId(type= IdType.AUTO)
    private Integer id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "remarks")
    private String remarks;

    @TableField(value = "tenant_id")
    private String tenantId;

    @TableField(value = "gid")
    private String gid;

    /**
     * 1 圆 2 自定义
     */
    @TableField(value = "type")
    private Integer type;

    @TableField(value = "update_time")
    private Date updateTime;


    /***
     * 圆形围栏中心点 longitude,latitude
     */
    @TableField(exist = false)
    private String center;

    /**
     * 圆形围栏半径
     */
    @Size(min = 0,max = 50000)
    @TableField(exist = false)
    private Integer radius;

    /***
     * 多边形围栏坐标点 lon1,lat1;lon2,lat2;（3<=点个数<=5000）。多边形围栏外接圆半径最大为5000米。
     */
    @Size(min = 3,max = 5000)
    @TableField(exist = false)
    private List<String> points;

    @TableField(exist = false)
    private List<Integer> ids;

    /***
     * 关联设备
     */
    @TableField(exist = false)
    private List<AlarmDeviceConfig> alarmDeviceConfigList;

    /***
     * 告警设置
     */
    @TableField(exist = false)
    private List<AlarmConfig> alarmConfigList;

    /***
     * 告警联系人
     */
    @TableField(exist = false)
    private List<AlarmPersonContact> alarmPersonContactList;
}
